<?php
/**
 * Created by JetBrains PhpStorm.
 * User: FangXuanLing
 * Date: 13-11-21
 * Time: 上午11:31
 * To change this template use File | Settings | File Templates.
 */
?>
<div >
    <strong><?php echo $name ?> </strong>

    <table>
        <tr>
            <td>ID</td><td>来源</td><td>评论者</td><td>状态</td><td>发布时间</td><td>操作</td>
        </tr>
    <?php foreach($comm as $c){ ?>
        <tr>
            <td><?php echo $c->id ?></td>
            <td><?php echo $c->post->title ?></td>
            <td>评论者</td>
            <td>
                <?php
                if($c->status ==0){
                    echo "未审核";
                }
                elseif($c->status == 1){
                    echo "已审核";
                }
                elseif($c->status == 2){
                    echo "已删除";
                }
                ?>
            </td>
            <td><?php echo date("Y-m-d",$c->ctime) ?></td>
            <td>
                <a href="<?php echo Yii::app()->createUrl("admin/comment/audit",array('id'=>$c->id))  ?>">审核通过</a>|
                <a href="<?php echo Yii::app()->createUrl("admin/comment/del",array('id'=>$c->id))  ?>">删除</a>
            </td>
        </tr>
    <?php } ?>
    </table
</div>
<div id="pager">
    <?php

    $this->widget('CLinkPager',array(
            'header'=>'',
            'firstPageLabel' => '首页',
            'lastPageLabel' => '末页',
            'prevPageLabel' => '上一页',
            'nextPageLabel' => '下一页',
            //'pages' => $pages,
            'maxButtonCount'=>13
        )
    );
    ?>
</div>